let Jump_Login = document.querySelector('.jump_login');
let Jump_Register = document.querySelector('.jump_register');
let RegisterContainer = document.getElementById('reContainer');
let LoginContainer = document.getElementById('lgContainer');
//点击导航栏li用户动态显示所有人动态
var li_consumer_trends = document.querySelector('.li_consumer_trends');
var all_consumer_banner = document.querySelector('.all_consumer_banner');
//点击导航栏li个人动态显示个人动态
var li_personal_trends = document.querySelector('.li_personal_trends');
var personal_trend = document.querySelector('.personal_trend');
//nav栏点击注册登录弹出
var jump_to_re_lg = document.querySelector('.nav_re_lg');
var re_lg = document.querySelector('.re_lg');
//点击nav头像后，出现账号信息页面
var personal_interface = document.querySelector('.personal_interface');

display_none();
//封装一个全部display=none的方法
function display_none() {
	personal_interface.style.display = "none";
	re_lg.style.display = 'none';
	all_consumer_banner.style.display = "none";
	// personal_trend.style.display = "none";
}

//切换登录注册界面开始
jump_to_re_lg.addEventListener('click', function () {
	display_none();
    re_lg.style.display = 'block';
})
//登录注册切换
let JumpToLogin = Jump_Login.onclick = () =>{
		
	LoginContainer.style.display = "block";
	RegisterContainer.style.display = "none";
		
}
let JumpToRegister = Jump_Register.onclick = () =>{
	
	LoginContainer.style.display = "none";
	RegisterContainer.style.display = "block";
		
}
//登录注册切换结束
//切换登录注册界面结束

//切换全部用户界面
li_consumer_trends.addEventListener('click', function () {
	display_none();
    all_consumer_banner.style.display = "block";
})
//切换账号信息界面
user_profile.addEventListener('click', function () {
	display_none();
    personal_interface.style.display = "block";
})
//切换个人动态界面
li_personal_trends.addEventListener('click', function () {
	display_none();
	personal_trend.style.display = "flex";
})
